package com.itheima.demo2genericity;
//泛型
import java.util.ArrayList;
import java.util.Arrays;

public class GenericityDemo1
{
    public static void main(String[] args) {
        ArrayList< String> list= new ArrayList<>();
        list.add("hello");
        list.add("world");
        show(list);
    }
    public static void show(ArrayList<String> list){
            for(int i=0;i<list.size();i++)
            {
                System.out.println(list.get(i));
        }
    }
}
